
import java.io.File;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author Dark_Wolf
 */
public class FileTest {
    public static void main(String[] args){
        {
            FileOutputStream stream = null;
            try {
                URI uri = new URI("file:///g:/testmusic/ayla/nirwana/03%20-%20singularity%20(brainchild%20ii)%20(radio%20edit).mp3");
                File file1 = AlbumHelper.songbirdToJavaFile("file:///g:/testmusic/ayla/nirwana/03%20-%20singularity%20(brainchild%20ii)%20(radio%20edit).mp3");
               
                System.out.println(file1.isFile());
                stream = new FileOutputStream(file1);
                File file = new File("C:/Users/Dark_Wolf/Desktop/AlbumArt_{87382248-614B-46B6-8E62-3963FDF8C74D}_Large.jpg");
                System.out.println(file.exists());
                
                Avatar av = new FileAvatar(file,uri, "Ayla", "Nirwana", true, new CDShelf());
                av.embedImage();
            } catch (FileNotFoundException ex) {
               ex.printStackTrace();
            } catch (URISyntaxException ex) {
               ex.printStackTrace();
            }


            finally {
                try {
                    stream.close();
                } catch (IOException ex) {
                    Logger.getLogger(FileTest.class.getName()).log(Level.SEVERE, null, ex);
                }
            }
        }
        

    }

}
